{# Heredando la plantilla principal #}

{% extends 'default.html' %}
{% use 'navegacion.html' %}
{% use 'loginUsuario.html' %}

{% block contenidos %}
<section style="margin-top:50px">
	<div class="hero-unit">
		<h1>Declaraciones Juradas</h1>
	</div>
	<section class="row-fluid">   
		<div class="well well-small">
			<h2>Nueva DDJJ</h2>		
			<p><a class="btn btn-primary btn-large" href="nuevaDDJJ.php">Generar Nueva Declaracion Jurada &raquo;</a></p>
		</div>
	</section>
	<section class="row-fluid">   
		 <div class="span6 well well-small">
            <h3>DDJJ No pagas <br /> Sin Instrumento de Pago</h3>
			{% if ddjjsindocu|length > 0 %}			
				<table id="ddjjsindocu" class="table">
				  <thead>
					<tr>
					  <th>A&ntilde;o</th>
					  <th>Mes</th>
					  <th>Total</th>
					  <th>Acciones</th>
					</tr>
				  </thead>
				   <tbody>					
					{% for ddjjsdocu in ddjjsindocu %}
						<tr>
						  <td>{{ ddjjsdocu.perano }}</td>
						  <td>{{ ddjjsdocu.permes }}</td>
						  <td>{{ ddjjsdocu.totapo }}</td>
						  <td>
						  <a href="editarDDJJ.php?control={{ddjjsdocu.control}}"><i title="Editar" class="icon-pencil icon-black"></i></a><a style="cursor: pointer;"></a> 
						  <a href="imprimirDDJJ.php?control={{ddjjsdocu.control}}&tipo=sindocu" onclick="window.open(this.href,'Info','resizable=YES, Scrollbars=YES', width=800,height=600, top=150, left=100); return false"><i title="Imprimir DDJJ" class="icon-print icon-black"></i></a> 
						  <a href="eliminarDDJJ.php?control={{ddjjsdocu.control}}"><i title="Eliminar" class="icon-trash"></i></a> 
						  </td>
						</tr>
					{% endfor %}
				   </tbody>	
				</table>
				<p><a class="btn btn-primary" href="ddjjsindocumento.php">Ver Mas &raquo;</a></p>
			{% else %}
				<legend> No existen ddjj no pagas sin instrumento de pago </legend>
			{% endif %}	
         </div>
		 <div class="span6 well well-small">
            <h3>DDJJ No Pagas <br /> Con Instrumento de Pago</h3>
			{% if ddjjcondocu|length > 0 %}			
				<table id="ddjjcondocu" class="table">
				  <thead>
					<tr>
					  <th>A&ntilde;o</th>
					  <th>Mes</th>
					  <th>Total </th>
					  <th>Instr. Pago  <a href="docs/instrumento_especificaciones.pdf" onclick="window.open(this.href,'Info','resizable=YES, Scrollbars=YES', width=800,height=600, top=150, left=100); return false"><i title="Info" class="icon-info-sign icon-black"></i></a> </th>
					  <th>Acciones</th>
					</tr>
				  </thead>
				   <tbody>					
					{% for ddjjcdocu in ddjjcondocu %}
						<tr>
						  <td>{{ ddjjcdocu.perano }}</td>
						  <td>{{ ddjjcdocu.permes }}</td>
						  <td>{{ ddjjcdocu.totapo }}</td>
						  <td>{{ ddjjcdocu.instrumento }}</td>
						  <td><a href="imprimirDDJJ.php?control={{ddjjcdocu.control}}&tipo=condocu" onclick="window.open(this.href,'Info','resizable=YES, Scrollbars=YES', width=800,height=600, top=150, left=100); return false"><i title="Imprimir DDJJ" class="icon-print icon-black"></i></a></td>
						</tr>
					{% endfor %}
				   </tbody>	
				</table>
				<p><a class="btn btn-primary" href="ddjjcondocumento.php">Ver Mas &raquo;</a></p>
			{% else %}
				<legend> No existen ddjj no pagas con instrumento de pago </legend>
			{% endif %}	
           
         </div>
	
	</section>
	<section class="row-fluid">
		 <div class="well well-small">
            <h3>DDJJ Pagas</h3>
          	{% if ddjjvalidas|length > 0 %}			
		   	<table id="ddjjvalidas" class="table">
			  <thead>
				<tr>
				  <th>A&ntilde;o</th>
				  <th>Mes</th>
				  <th>Total </th>
				  <th>Instr. Pago <a href="docs/instrumento_especificaciones.pdf" onClick="window.open(this.href,'Info','resizable=YES, Scrollbars=YES', width=800,height=600); return false"><i title="Info" class="icon-info-sign icon-black"></i></a> </th>
				  <th>Acciones</th>
				</tr>
			  </thead>
			   <tbody>					
				{% for ddjjvalidas in ddjjvalidas %}
					<tr>
					  <td>{{ ddjjvalidas.perano }}</td>
					  <td>{{ ddjjvalidas.permes }}</td>
					  <td>{{ ddjjvalidas.totapo }}</td>
					  <td>{{ ddjjvalidas.instrumento }}</td>
					  <td>
					  		{% if ddjjvalidas.mescod <= 12 %}
					  			<a href="nuevaDDJJTomada.php?control={{ddjjvalidas.control}}"><i title="Tomar Informacion" class="icon-download-alt icon-black"></i></a> 
							{% endif %}
								<a href="imprimirDDJJ.php?control={{ddjjvalidas.control}}&tipo=valida" onclick="window.open(this.href,'Info','resizable=YES, Scrollbars=YES', width=800,height=600, top=150, left=100); return false"><i title="Imprimir DDJJ" class="icon-print icon-black"></i></a>
					 </td>
					</tr>
				{% endfor %}
			   </tbody>	
	  		</table>
			<p><a class="btn btn-primary" href="ddjjvalidas.php">Ver Mas &raquo;</a></p>
			{% else %}
				<legend> No existen ddjj pagas</legend>
			{% endif %}	
			
      </div>
    </section>
</section>
{% endblock %}
